<template>

  <NavBarCmp />

  <SlideCmp :top_stories="top_stories" />

  <RecentArticlesCmp :recentStories="recentStories" />

  <HistoryArticlesCmp :currentDateTime="currentDateTime" />

</template>



<script setup>
import { getCurrentDateTime } from "@/tools/index.js";
import { getLatestDailyList } from "@/api/index.js";
import { ref, onMounted } from "vue";

const top_stories = ref([])
const recentStories = ref([])
const currentDateTime = ref(getCurrentDateTime())

onMounted(async () => {
  const response = await getLatestDailyList()
  top_stories.value = response.top_stories
  recentStories.value = response.stories

  // currentDateTime.value = getCurrentDateTime()
})
  ;


</script>
